Some (newer?) GCC versions complain when a g_auto variable isn't
initialized when declared, even when the initialization is guaranteed
to happen before the variable is used or goes out of scope.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/2298
num_children = g_variant_n_children (variant);
for (i = 0; i < num_children; i++)
{
- g_autoptr(GVariant) gpu;
+ g_autoptr(GVariant) gpu = NULL;
g_autoptr(GVariant) env = NULL;
g_autoptr(GVariant) default_variant = NULL;
g_autofree const char **env_s = NULL;
GParamSpec *pspec,
StTextureCache *cache)
{
- g_autofree gchar *theme;
+ g_autofree gchar *theme = NULL;
st_texture_cache_evict_icons (cache);
static gboolean
copy_extension_template (GFile *target_dir, GError **error)
{
- g_auto (GStrv) templates;
+ g_auto (GStrv) templates = NULL;
char **s;
templates = g_resources_enumerate_children (TEMPLATE_PATH, 0, NULL);